<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-1.11.0.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		/* 向右移动 */
		$("#b1").click(function(){
			$("#p").animate({left:'500px'},'slow');
		});
		/* 暂停移动 */
		$("#b2").click(function(){
			$("#p").stop();
		});
	});
</script>
</head>
<body>
<input type="button"  id="b1" value="向右移动"/>
<input type="button"  id="b2" value="停止"/>
<div id="p" style="width: 100px;height: 100px;background-color: red;margin: 10px;position: absolute;"></div>
</body>
</html>